package com.bmcsoft;

import java.util.ArrayList;
import java.util.Random;

/**
 * @User: Alan
 * @Date: 2019/9/20
 * @Time: 15:43
 * @Version: 1.0
 */
public class CardsPacksFactory {
    public void packing(ArrayList<Integer> list){
        //从1000张卡牌中随意抽取5张打包
        //随机获取一个集合中的索引编号
        int index = new Random().nextInt(list.size());
        //设置20个卡包
        int[][] arr = new int[20][5];
        for (int i = 0;i <= 19;i++) {
            for (int j =0;j <= 4;j++) {
                //根据索引，从集合中删除，并且获取删除的编号
                int delta = list.remove(index);
                arr[i][j]=delta;
            }
        }

    }
}
